
var express = require('express')
var app = express()
var fs = require('fs')
var router = require('./router.js')
var bodyParser = require('body-parser')
app.engine('html',require('express-art-template'))
app.use('/node_modules/', express.static('./node_modules/'))
app.use('/public/', express.static('./public/'))
//配置body-parser中间件，这两部一定要放在挂载路由之前
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
//把路由挂载到app服务中
app.use(router)
// router(app)
app.listen(3000, function () {
	console.log('app is running……')
})
